package com.Guo.system.service.impl;

import com.Guo.system.entity.Department;
import com.Guo.system.entity.User;
import com.Guo.system.mapper.DepartmentMapper;
import com.Guo.system.service.DepartmentService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guo
 * @since 2020-12-03
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    @Override
    public Page<Department> findDeptAll(@Param("page") Page<Department> page, @Param("name")String name) {
        List<Department> deptAll = this.baseMapper.findDeptAll(page, name);
        return page.setRecords(deptAll);
    }

}
